/**
 * Copyright (C)  Gadglet .
 *
 * This file is part of Gadglet
 *
 * Gadglet is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Gadglet is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Gadglet. If not, see <http://www.gnu.org/licenses/>.
 */

package com.gadglet.params;

public enum ReqParamNames {
	
	ACTION_PARAM_NAME 				("gadgetAction"),
	APP_URL 						("opensocial_app_url"),
	CONSUMER_KEY 					("oauth_consumer_key"),
	CONTAINER_KEY 					("opensocial_container"),
	CUSTOM_ACTION_PARAM_NAME 		("customGadgetAction"),
	CUSTOM_CONTENT_PARAM_NAME		("gadgetContentName"),  
	FILTER_BY_FIELDS_PARAM_NAME 	("filterByFieldsParam"),
	FILTER_BY_PARAM_NAME 			("filterByParam"),
	GADGET_DEBUG_CODE				("debugCode"),
	GADGET_PARAM_NAME				("gadgetName"),
	GADGET_VIEW_STATE				("gadgetViewState"),
	ITEM_KEY_PARAM_NAME 			("gadgetContentItemKey"),
	ITEMS_NUM						("itemsNum"),
	ITEMS_START_FROM				("firstItemNum"),
	OWNER_ID_KEY 					("opensocial_owner_id"),
	RETURN_FIELDS_PARAM_NAME 		("returnFieldsParam"),
	SHARE_TYPE						("shareType"),
	SHARE_WITH						("shareWith"),
	SORT_BY_PARAM_NAME 				("sortByParam"),
	VIEWER_ID_KEY 					("opensocial_viewer_id");
	
	public static boolean isSysParamName(String paramName){
		
		for(ReqParamNames param : ReqParamNames.values()){
			
			if(param.getParamName().equals(paramName))
				return true;
		}
		return false;
	} 
	private String paramName = null;
	
	ReqParamNames(String paramName){
		this.paramName = paramName;
	}
	
	public String getParamName(){
		
		return this.paramName;
	}
}
